<template>
  <div class="bread-item">
    <router-link v-if="to"
                 :to="to">
      {{ label }}
    </router-link>
    <p v-else>{{ label }}</p>
  </div>
</template>

<script lang="ts"
        setup>
withDefaults(defineProps<{
  label?: string
  to?: string
}>(), {
  label: ''
})
</script>

<style lang="less"
       scoped>
.bread-item {
  a {
    &:hover {
      color: @xtxColor;
    }

    &:after {
      content: '>';
      margin: 0 4px;
      color: black;
    }
  }
}
</style>